package com.example.demo02.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.example.demo02.entity.StatCouponShop;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface StatCouponShopMapper extends BaseMapper<StatCouponShop> {

    default List<StatCouponShop> queryList() {
        LambdaQueryWrapper<StatCouponShop> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.select(StatCouponShop::getDiscountType,StatCouponShop::getUseAmount)
                .and(i->i.eq(StatCouponShop::getDiscountType,1));
        return this.selectList(queryWrapper);
    }

}
